#include "RemovePSProcess.h"

//------------------------------------------------------------------------------------
RemovePSProcess::RemovePSProcess(const unsigned long lifeDuration, Ogre::SceneNode *node, GameView *view)
	: mLifeDuration(lifeDuration), mpNode(node), mpView(view)
{
}
//------------------------------------------------------------------------------------
RemovePSProcess::~RemovePSProcess(void)
{
}
//------------------------------------------------------------------------------------
void RemovePSProcess::update(const unsigned long elapsedTime)
{
	if (elapsedTime >= mLifeDuration)
	{
		mpView->getSceneManager()->getRootSceneNode()->removeAndDestroyChild(mpNode->getName());
		kill();
		return;
	}

	mLifeDuration -= elapsedTime;
}
